package org.example.system.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;
import org.example.entity.BaseEntity;

import java.util.Date;

/**
 * 帖子
 */
@TableName("post")
@Data
public class Post extends BaseEntity {
    @TableId(type = IdType.AUTO)
    private Long id;     //id
    private Long userId; //所属用户ID
    private String title;   //帖子标题
    private String content; //帖子内容
    private String image;  //图片
    private Integer watchCount;  //观看数量
    private Integer remarkCount; //评论数量
    private Integer likeCount;   //点赞数量
    private Integer status;//帖子状态
    private Date createTime;//创建时间
    @TableField(exist = false)
    private String nickname;   //帖子所属ID的用户昵称
    @TableField(exist = false)
    private String avatarPath;   //帖子所属ID的用户头像
}
